<template>
  <div>
   <h1 >自定义方法</h1>
   <p>宽:{{size.w}},高:{{size.h}}</p>
   <p>x:{{position.x}},y:{{ position.y}}</p>
   <p  style="font-size: 12px;">x:{{position.x}},y:{{ position.y}}</p>
   <p ref="follow">abc</p>
  </div>
</template>
<script setup>
// 导入自定义方法
// 没有this,引用方法是函数
import {useWinSize} from './hooks/useWinSize.js'
import { ref} from 'vue'; 
import {useMouse,useFollow} from './hooks/useMouse.js'
const position  = useMouse();
const size = useWinSize();
const follow = useFollow();
</script>